import React from "react";
import { useLocation } from "react-router-dom";

const Detail = () => {
  const location = useLocation();
  const v = location.state;
  
  return <div>
    <img src={v.image} alt="" width="100%"/>
    <h2>
      <span>{v.title}</span>
      <span>{v.date}</span>
    </h2>
  </div>;
};

export default Detail;
